import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/login',
      component: () => import('@/views/login/indexPage.vue'),

    },
    {
      path: '/',
      component: ()=> import('@/views/MyLayout.vue'),
      redirect: '/home',
      children: [
        {
          path: 'home',
          component: () => import('@/views/home/Myindex.vue')
        },
        {
          path: 'article',
          component: () => import('@/views/article/MyIndex.vue')
        },
        {
          path: 'publish',
          component: () => import('@/views/publish/MyIndex.vue')
        }
      ]
    },
  ],
})

export default router
